package com.bto.solar.work.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.sql.Timestamp;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author adrian
 * @since 2023-08-28
 */
@Getter
@Setter
@Accessors(chain = true)
@ApiModel(value = "User对象", description = "用户表")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("用户id")
    @TableId(value = "user_id", type = IdType.AUTO)
    private Long userId;

    @ApiModelProperty("用户名")
    private String name;

    @ApiModelProperty("邮箱")
    private String email;

    @ApiModelProperty("电话")
    private String phone;

    @ApiModelProperty("账号")
    private String account;

    @ApiModelProperty("状态（0：禁用，1：正常）")
    private Byte status;

    @ApiModelProperty("头像")
    private String avatar;

    @ApiModelProperty("公司ID")
    private Long companyId;

    @ApiModelProperty("来源(0-注册，1-后台添加)")
    private Byte source;

    @ApiModelProperty("密码")
    private String password;

    @ApiModelProperty("用户部门")
    private String departmentIds;

    @ApiModelProperty("角色")
    private String rolesIds;

    @ApiModelProperty("权限")
    private String permissionIds;

    @ApiModelProperty("性别")
    private Byte gender;

    @ApiModelProperty("审核")
    private String approve;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Timestamp createTime;

    @ApiModelProperty("更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Timestamp updateTime;

    @ApiModelProperty("是否删除（0：存在，1：删除）")
    @TableField("is_deleted")
    private Boolean deleted;
}
